var PurchaseExcelList = new Vue({
    el: '#PurchaseExcelList',
    //初始化数据类型
    data: {
        ordersDetails: [],
        cgdw:'',
        counter: 0
    },
    //时间提交方法
    methods: {
        printArea: function (e) {
            var _this=this;
            _this.pagesetup_null();
            _this.pagesetup_default();
            var subOutputRankPrint = document.getElementById('printContent');
            console.log(subOutputRankPrint.innerHTML);
            var newContent = subOutputRankPrint.innerHTML;
            var oldContent = document.body.innerHTML;
            document.body.innerHTML = newContent;
            window.print();
            window.location.reload();
            document.body.innerHTML = oldContent;
            return false;
        },
        //网页打印时清空页眉页脚
        pagesetup_null: function () {
            try {
                var RegWsh = new ActiveXObject("WScript.Shell")
                hkey_key = "header"
                RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")
                hkey_key = "footer"
                RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")
            } catch (e) {
            }
        },
        pagesetup_default: function () {
            try {
                var RegWsh = new ActiveXObject("WScript.Shell")
                hkey_key = "header"
                RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "&w&b页码，&p/&P")
                hkey_key = "footer"
                RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "&u&b&d")
            } catch (e) {
            }
        },
    },
    //页面加载完成后执行此方法
    created: function () {
        var _this=this;
    }
});
